def userlogin(user,passwrd):
    if user == 'zhangsan' and passwrd == '888':
        return True
    else:
        raise ValueError("账号和密码有误")
    
check = userlogin("zhangsan","8888")
if check :
    print("登录成功")    